import instance from "./request"

//登录接口(当前返回值是一个Promise ,resolve(res类型))
export const LoginApi = (params: ILoginP): TLogin => instance.post("/1024/login", params)
//注册接口(当前返回值是一个Promise ,resolve(res类型))
export const RegApi = (params: IRegP): TLogin => instance.post("/1024/register", params)

//首页数据
export const HomeApi = (): THome => instance.get("/6666")
//快速刷题
export const FastApi = () => instance.get("/4698")

//切换科目
export const SubjectApi = (params: ISubject): TSubject => instance.get(`/6666/${params.actionCode}`)

//切换默认学科
// export const MoRenApi = (params:IMoRen) => instance.post(`/6666/$params.actionCode`)
export const MoRenApi = (actionCode: string): TLogin => instance.post(`/6666/${actionCode}`)

// //快速刷题
export const SwitchApi = (): TSwitch => instance.get("/6666/field")
// 快速刷题
export const FsatAPI = (): TFast => instance.get("/4698")

//进入练习页面
export const GetTestApi = (actionCode: string, testType: string = "all"): TTest => instance.get(`/1314/${actionCode}/${testType}`)



//获取题目接口
export const TiMuApi = (params: IQues): TQues => instance.post("/1314", params)




